//- body + navigation(sitetoolbar + prev + next + sidebar) + content(article.main)
extends ./html

block body

  .page(class=[sidebar && 'page_sidebar_on', layout_page_class])
    script
      :uglify
        if (localStorage.noSidebar) {
          document.querySelector('.page').classList.remove('page_sidebar_on');

          var pageWrapper = document.querySelector('.page-wrapper');
          pageWrapper && pageWrapper.classList.remove('page-wrapper_sidebar_on');
        }
        setTimeout(function() {
          document.querySelector('.page').classList.add('page_sidebar-animation-on');
        }, 0);

    block banner

    block header

    //- main content goes before sidebar (visitor will see it first)
    .page__inner
      main(class=(mainclass ? mainclass : 'main') + ' ' + [layout_main_class])
        block main

    if sidebar
      +b(class="sidebar page__sidebar #{sidebar.class}")
        +e('button').toggle(data-sidebar-toggle)
        block sidebar-buttons
        +e.inner
          +e.content
            block sidebar
